package com.ceres.login.dao;


import com.ceres.login.pojo.Role;
import com.ceres.login.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface UserMapper extends Mapper<User> {
    @Select("select end_time from t_customer where id=(select customer_id from t_cust_user where username=#{username})")
    public Date findDateByusername(String username);
    @Select("select rid from t_cust_user_role where cuid= (select id from t_cust_user where username=#{username})")
    public List<Integer> findRoleByUsername(String username);
    @Update("update t_cust_user set status='0' where username=#{username}")
    public void editUserStatus(String username);
}
